Use waypt_new in geo.c and then override the alt.
authorrobertl <robertl>
Fri, 26 Jan 2007 15:43:37 +0000 (15:43 +0000)
committerrobertl <robertl>
Fri, 26 Jan 2007 15:43:37 +0000 (15:43 +0000)
geo.c

diff --git a/geo.c b/geo.c
index c19706a96cbe99761b27bd5364e7d84ede658acd..9dbd84c9be20c7ecc871fe5475ed629430864aa2 100644 (file)
--- a/geo.c
+++ b/geo.c
@@ -68,8 +68,14 @@ xg_tag_mapping loc_map[] = {
 
 void wpt_s(const char *args, const char **unused) 
 { 
-//     wpt_tmp = waypt_new();
-       wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1);
+       wpt_tmp = waypt_new();
+       /*
+        * 'geo' doesn't really have an 'unknown' and doesn't have any
+        * concept of alt.  Unfortunately, we have many reference files
+        * that have leaked the 'unknown_alt' value into them, so we paper
+        * over that here.
+        */
+       wpt_tmp->altitude = 0;
 }
 
 void wpt_e(const char *args, const char **unused)